package com.demo.mapper;

import com.demo.entity.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMapper {

    @Select("SELECT * From lab_role order by role_id")
    List<Role> list();

    @Select("SELECT lab_menu.menu_path FROM lab_menu inner join lab_role_menu on lab_menu.menu_id =lab_role_menu.menu_id" +
            " where lab_role_menu.role_id =#{roleId}")
    List<String> path(String roleId);
}
